import Vue from 'vue';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import App from './App';

/* 载入模板 */
import home from 'components/home/home';
import card from 'components/card/card';
import 'common/stylus/color.styl';
import 'common/stylus/index.styl';

Vue.use(VueRouter);
Vue.use(VueResource);

/* 载入跳转路径 */
const routes = [
/*  { path: '*',
    component: NotFoundComponent
  }, */
  {
    path: '/',
    component: home
  },
  {
    path: '/card',
    component: card
  }
];

const router = new VueRouter({
  mode: 'history',
  linkActiveClass: 'active',
  routes
});

/* eslint-disable no-new */
Vue.http.options.root = 'http://askactivity.lightway.cc';
Vue.http.options.emulateJSON = true;
new Vue({
  el: '#app',
  router,
  render: h => h(App)
});
